From: Sebastian Keller Date: Thu, 22 Jul 2021 15:24:30 +0000 (+0200) Subject: keyboard: Use microseconds for notify_keyval() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~174 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bb8daaeb2f1f1e0d11c0221e665dca2e892da22d;p=gnome-shell.git keyboard: Use microseconds for notify_keyval() ClutterVirtualInputDevice::notify_keyval() expects time to be in microseconds but Clutter::get_current_event_time() returns the time in milliseconds. On Wayland the generated event triggers all the warnings in MetaDisplay::sanity_check_timestamps() due to the event time seemingly being in the past. Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index bc72d77f3..d0dde5b23 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -2125,12 +2125,12 @@ var KeyboardController = class { } keyvalPress(keyval) { - this._virtualDevice.notify_keyval(Clutter.get_current_event_time(), + this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, keyval, Clutter.KeyState.PRESSED); } keyvalRelease(keyval) { - this._virtualDevice.notify_keyval(Clutter.get_current_event_time(), + this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, keyval, Clutter.KeyState.RELEASED); } };